<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加/修改微信号</title>
<link rel="stylesheet" type="text/css" href="${basePath}/css/default_user_com.css" media="all">
<#include '/frame/version.html'>
<#include '/frame/manage/include_css.html'>
<#include '/frame/manage/include_js.html'>
<#include '/frame/taglib.html'>
</head>
<body id="nv_member" class="pg_CURMODULE">
<#assign menu_index='menu_102'/>
<#assign current='menu_sysuser'>
	<div id="wp" class="wp">
		<#include "/include/header.html"/>
		<div class="contentmanage">
			<div class="developer">
				<#-- <div class="appTitle normalTitle">
					<h2>管理平台</h2>
					<div class="accountInfo"></div>
					<div class="clr"></div>
				</div> -->
				<div class="tableContent">
					<#include "/include/left.html"/>
					       <#include "/include/wxtop.html"/>
					<div class="content">
						<form method="post" action="${basePath}/admin/wxusers/wxuser" >
							<input type="hidden" name="id" value="${bean.id?default('')}"/>
							<div class="msgWrap">
							<table class="userinfoArea" border="0" cellspacing="0" cellpadding="0" width="100%">
								<thead>
									<tr>
										<th><span class="red">*</span>公众号名称：</th>
										<td>
											<input type="text" placeholder="请输入公共号名称" class="px input_width_500" name="wxname" value="${bean.wxname?default('')}" tabindex="1" />
										</td>
									</tr>
								</thead>
								<tbody>
									<tr>
										<th><span class="red">*</span>公众号原始id：</th>
										<td>
											<input type="text" placeholder="请输入公众号原始id" name="wxid" value="${bean.wxid?default('')}" onmouseup="this.value=this.value.replace('_430','')" class="px  input_width_500" tabindex="1" size="25"> 
										</td>
									</tr>
									<tr>
										<th><span class="red">*</span>微信号：</th>
										<td>
											<input type="text" placeholder="请输入微信号" name="wxCode" value="${bean.wxCode?default('')}" class="px input_width_500" tabindex="1" size="25" />
										</td>
									</tr>
									<tr>
										<th>头像图片:</th>
										<td>
											<input type="text" readonly class="px input_width_500" id="input_uploader" value="${bean.headerpic}" name="headerpic" />
											<a href="javascript:void(0);" onclick="uploadImage(this,'sysuser',0)" class="a_upload">上传</a>
											<a href="javascript:void(0);" onclick="preViewImage(this)" class="a_upload">预览</a>
										</td>
									</tr>
									<tr>
										<th><span class="red">*</span>AppID（公众号）：</th>
										<td><input type="text"  placeholder="请输入公众号" name="appid" value="${bean.appid?default('')}" class="px input_width_500" tabindex="1" size="25" /> 
											<p>用于自定义菜单等高级功能 </p>
										</td>
									</tr>
									<tr>
										<th><span class="red">*</span>AppSecret：</th>
										<td><input  type="text" placeholder="请输入AppSecret" name="appsecretd" value="${bean.appsecretd?default('')}" class="px input_width_500" tabindex="1" size="25" /> 
											<p>用于自定义菜单等高级功能 </p>
										</td>
									</tr>
									<tr>
										<th><span class="red"></span>二维码：</th>
										<td>
											<input type="text" readonly class="px input_width_500" id="input_uploader" value="${bean.qrUrl}" name="qrUrl" />
											<a href="javascript:void(0);" onclick="uploadImage(this,'sysuser',0)" class="a_upload">上传</a>
											<a href="javascript:void(0);" onclick="preViewImage(this)" class="a_upload">预览</a>
										</td>
									</tr>
									<tr>
										<th><span class="red"></span>AesEncodingKey：</th>
										<td>
											<input type="text" placeholder="请输入AesEncodingKey" name="encodingaeskey" value="${bean.encodingaeskey?default('')}" class="px input_width_500" tabindex="1" size="55" /> 
											<p>加密消息的AesEncodingKey</p>
										</td>
									</tr>
									<tr>
										<th></th>
										<td><button type="button" class="btnGreen" id="saveSetting">保存</button></td>
									</tr>
								</tbody>
							</table>
							<input type="hidden" name="token" value="${token?default('')}" class="px" tabindex="1" size="40" />
							</div>
						</form>
					</div>
					<div class="clr"></div>
				</div>
			</div>
		</div>
		<!--底部-->
	</div>
	</div>
	</div>
	</div>
	<#include "/include/footer.html"/>
	
	<script type="text/javascript" src="${basePath}/js/frames/common_uploader.js"></script>
	<script type="text/javascript">
		var layerIndex = 0;
		var tag = "";
		
		$(function(){
			$("#winxintype").change(function(){
				var typeName = $(this).children(":selected").text();
				$(this).prev().val(typeName);
			});
			
			$("#saveSetting").click(function(){
				var $input = $("input:text").not("input[readonly='readonly']");
				for(var i = 0;i < 5;i++){
					var that = $input.get(i);
					var val = that.value;
					if(val == null || val==""){
						var msg = $(that).closest("td").prev("th").text().replace("*","").replace("：","");
						layer.alert(msg+"不能为空", {icon:0});
						return false;
					}
				}
				$("form").submit();
			});
		});
	</script>
</body>
</html>